#include "declarations.h"
#include <stdlib.h>

bool findKey(symbol_table& table, string key)
{
    for (symbol_table::iterator it = table.begin(); it < table.end(); it++) {
        if (it->find(key) != it->end()) return true;
    }
    
	return false;
}

void addSymbol(symbol_table& table, string key, values_struct value)
{
	table.front()[key] = value;
}

void pushScope(symbol_table& table)
{
	table.push_front(map<string, values_struct>());
}

void popScope(symbol_table& table)
{
	table.pop_front();
}

